{include_file name="Public/header" title="网站设置"}
		
		<!-- begin #content -->
		<div id="content" class="content">

			<!-- begin page-header -->
			<h1 class="page-header">网站设置</h1>
			<!-- end page-header -->


			<!-- begin row -->
			<div class="row">
                <!-- begin col-6 -->
				<div class="col-md-12 ">
					<!-- begin panel -->
					<div class="panel panel-inverse" >
						<form action="{U('config/site')}" method="POST" class="margin-bottom-0">
						<div class="panel-body">
							<fieldset>
								<!--网站名-->
								<div class="form-group">
									<label>网站名称：</label>
									<input type="text" name="site[site_name]" value="{$site_config.site_name}" class="form-control js_site_name" placeholder="{$config_info.mark}" datatype="*2-250" nullmsg="请输入{$config_info.title}" errormsg="请输入2-250汉字或字符">
									<span class="Validform_checktip"></span>
								</div>

								<!--网站标题-->
								<div class="form-group">
									<label>网站标题：</label>
									<input type="text" name="site[site_title]" value="{$site_config.site_title}" class="form-control js_site_title" placeholder="{$config_info.mark}" datatype="*2-250" nullmsg="请输入{$config_info.title}" errormsg="请输入2-250汉字或字符">
									<span class="Validform_checktip"></span>
								</div>

								<!--系统邮箱-->
								<div class="form-group">
									<label>系统邮箱{$config_info.title}：</label>
									<input type="text" name="site[site_email]" value="{$site_config.site_email}" class="form-control js_site_email" placeholder="{$config_info.mark}" datatype="e" null="请输入{$config_info.title}" errormsg="请输入合法邮箱地址">
									<span class="Validform_checktip"></span>
								</div>

								<!-- 网站主题 -->
								<div class="form-group">
									<label>网站主题：</label>
									<select class="form-control width-middle" name="site[site_theme]">
										{foreach $theme_list as $theme_name}
										<option value="{$theme_name}" {if {$site_config.site_theme} == $theme_name}selected{/if}>{$theme_name}</option>
										{/foreach}
									</select>
									<span class="Validform_checktip"></span>
								</div>

								<!--网站关键字-->
								<div class="form-group">
									<label>网站关键字：</label>
									<input type="text" name="site[site_keywords]" value="{$site_config.site_keywords}" class="form-control js_site_keywords" placeholder="" datatype="*2-250" >
									<span class="Validform_checktip"></span>
								</div>

								<!--网站描述-->
								<div class="form-group">
									<label>网站描述：</label>
									<textarea rows="2"  name="site[site_descript]" class="form-control js_site_descript" placeholder="" datatype="*2-250" >{$site_config.site_descript}</textarea>
									<span class="Validform_checktip"></span>
								</div>

								<!--网站版权-->
								<div class="form-group">
									<label>网站版权：</label>
									<textarea rows="2" name="site[site_copyright]" class="form-control js_site_copyright" placeholder="" ignore="ignore" datatype="*2-250">{$site_config.site_copyright}</textarea>
									<span class="Validform_checktip"></span>
								</div>

								<!--网站是否关闭-->
								<div class="form-group">
									<label>网站是否关闭：</label>
									<input type="radio" name="site[site_is_close]" value="1" class="form-group js_is_close" {if $site_config.site_is_close}checked{/if}>是
									<input type="radio" name="site[site_is_close]" value="0" class="form-group js_is_close" {if !$site_config.site_is_close}checked{/if}>否
									<span class="Validform_checktip"></span>
								</div>

								<!--网站关闭时提示信息-->
								<div class="form-group {if !$site_config.site_is_close}hidden{/if} js_site_close_box">
									<label>网站关闭说明：(<span class="label-tip">关闭后前台无法访问，后台不受影响</span>)</label>
									<textarea rows="1" name="site[site_close_msg]" class="form-control js_site_close_msg" placeholder="" datatype="*2-250" >{$site_config.site_close_msg}</textarea>
									<span class="Validform_checktip"></span>
								</div>

								<button type="submit" class="btn btn-sm btn-primary m-r-5 js_submit">保存设置</button>
							</fieldset>

						</div>
						</form>

						</div>
				</div>
					<!-- end panel -->
			</div>
                <!-- end col-6 -->
            <!-- end row -->
		</div>
		<!-- end #content -->

<script>
	$(document).ready(function() {
		//表单验证
		$("form").Validform({

			tiptype:function(msg,o,cssctl){

				if(!o.obj.is("form")){
					var objtip=o.obj.siblings(".Validform_checktip");
					cssctl(objtip,o.type);
					objtip.text(msg);
				}

			},

			label:"label",

			//ajaxPost:true,

			btnSubmit:".js_submit",

			beforeSubmit:function(){

				$(".js_submit").attr("disabled", "disabled").text('提交中..');

			},


		});

		//关闭网站状态切换
		$(".js_is_close").change(function(){
			var isClose = $(".js_is_close:checked").val();
			if(isClose == 1){
				$(".js_site_close_box").removeClass('hidden');
			}else{
				$(".js_site_close_box").addClass('hidden');
			}
		});


	});
</script>
{include_file name="Public/footer"}